package com.wx.service;

import com.wx.bean.GroupBean;
import com.wx.bean.PointBean;
import com.wx.bean.Userbean;
import com.wx.dao.IPointDao;
import com.wx.service.impl.IPointService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class PointServiceImpl implements IPointService {
    @Autowired
    IPointDao iPointDao;

    @Override
    public Userbean findByName(Userbean userbean) {
        return iPointDao.findByName(userbean);
    }

    @Override
    public List<Userbean> findByCode(Userbean userbean) {
        return iPointDao.findByCode(userbean);
    }

    @Override
    public int pointAdd(List<PointBean> list) {
        for (PointBean pointBean:list) {
            if (pointBean.getState()==null){
                return 0;
            }
        }
        return iPointDao.pointAdd(list);
    }

    @Override
    public List<PointBean> pointTableFandAll() {
        return iPointDao.pointTableFandAll();
    }

    @Override
    public List<GroupBean> findGroupName() {
        return iPointDao.findGroupName();
    }

    @Override
    public List<PointBean> conditionFind(PointBean pointBean) {
        return iPointDao.conditionFind(pointBean);
    }

    @Override
    public int findNumber(PointBean pointBean) {
        return iPointDao.findNumber(pointBean);
    }

    @Override
    public int findTeamLeaderLame(String teamLeaderLame) {
        return iPointDao.findTeamLeaderLame(teamLeaderLame);
    }

    @Override
    public int findTime(PointBean pointBean) {
        return iPointDao.findTime(pointBean);
    }

    @Override
    public int dateDelete(PointBean pointBean) {
        return iPointDao.dateDelete(pointBean);
    }
}
